<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>导航</title>
  <script>
    if(/http:/.test(location.href)) location.href = location.href.replace(/http:/, 'https:')
  </script>
  <script src="https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/jquery"></script>
  <script src="__PUBLIC__/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
  <link rel="stylesheet" href="__PUBLIC__/node_modules/bootstrap/dist/css/bootstrap.min.css">
</head>
<body>
  <ul class="nav nav-tabs" role="tablist">
    <li id="tuandui" role="presentation"><a href="{:U('manage_me')}" onclick="TopJumpOverThis(this)" aria-controls="tuandui" role="tab" data-toggle="tab"> 团 队 </a></li>
    <li id="qudao" role="presentation"><a href="{:U('manage_me_qudao')}" onclick="TopJumpOverThis(this)" aria-controls="qudao" role="tab" data-toggle="tab"> 渠 道 </a></li>
    <li id="chanpin" role="presentation"><a href="{:U('manage_me_chanpin')}" onclick="TopJumpOverThis(this)" aria-controls="chanpin" role="tab" data-toggle="tab"> 产 品 </a></li>
    <li id="shenqing" role="presentation"><a href="{:U('manage_me_shenqing')}" onclick="TopJumpOverThis(this)" aria-controls="shenqing" role="tab" data-toggle="tab"> 申 请 </a></li>
    <if condition='$Think.session.user.ck_fenxiao eq 1'><li id="yongjing" role="presentation"><a href="{:U('manage_me_yongjing')}" onclick="TopJumpOverThis(this)" aria-controls="yongjin" role="tab" data-toggle="tab"> 佣 金 </a></li></if>
    <li id="chengjiao" role="presentation"><a href="{:U('manage_me_chengjiao')}" onclick="TopJumpOverThis(this)" aria-controls="chengjiao" role="tab" data-toggle="tab"> 成 交 </a></li>
    <li id="qrcode" role="presentation"><a href="{:U('manage_me_qrcode')}" onclick="TopJumpOverThis(this)" aria-controls="erweima" role="tab" data-toggle="tab"> 二 维 码 </a></li>
    <if condition="$Think.session.zi_user eq null">
              <li id="logOUTBtn" style='float:right;' role="presentation"><a href="{:U('index/loginout')}" onclick="TopJumpOverThis(this)" aria-controls="erweima" role="tab" data-toggle="tab"> 退出登录 </a></li>
    <else />
    </if>

  </ul>

  <script>
    // 获取页面地址参数
    function GetQueryString(name) {
      var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)")
      var r = window.location.search.substr(1).match(reg)
      if(r!=null)return  unescape(r[2]); return null
    }
    function TopJumpOverThis (_this) {
      window.top.location.href = _this.href
    }
    /* 查询哪个是当前激活的 */
    function activeThis () {
      var url_p = GetQueryString('local')
      $(`#${url_p}`).addClass('active')
    }
    $(document).ready(function(){
      activeThis()
      /* 通知父层跳转 */
      // window.top.location.href = $(`#${url_p}`)
    })
  </script>
</body>
</html>

